package com.bdqn.Test;

import com.bdqn.Sj1.Factory;
import com.bdqn.Sj1.Technology;

import java.util.Scanner;

public class Sj1 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.print("请输入操作符:");
        String fu=in.next();
        System.out.print("请输入第一个数:");
        double num1=in.nextDouble();
        System.out.print("请输入第二个数:");
        double num2=in.nextDouble();

        Technology technology= Factory.factory(fu);
        System.out.println("计算后的值为:"+technology.getResult(num1,num2));
    }
}
